import request from '@/router/axios';
/**
 * 获取商品源接口 
 */
export const getProduceSourcePage = (current, size, shopIdStatic) => {
    return request({
      url: '/api/product-source/source/get_produce_source_page',
      method: 'get',
      params: {
        PageNo: current,
        PageSize: size,
        shopIdStatic
      }
    })
  }
/**
 * 获取商品源接口,关联ticket
 */
  export const getProductListByTicket = (current, size) => {
    return request({
      url: '/api/product-source/source/get_produce_source_page_ticket_self',
      method: 'get',
      params: {
        PageNo: current,
        PageSize: size
      }
    })
  }

  /**
 * 点击查询发送参数
 */
  export const getProductListByLongId = (LongId, pageNo, pageSize, shopIdStatic, subjectKey) => {
    return request({
      url: '/api/product-source/source/get_produce_source_page_ticket_id',
      method: 'get',
      params: {
        LongId, pageNo, pageSize, shopIdStatic, subjectKey
      }
    })
  }


/**
 * 同步商品源操作
 */
export const ProductAsyncSaveDate = (shopIdStatic) => {
  return request({
    url: '/api/product-source/source/async_save_date',
    method: 'get',
    params: {
      shopIdStatic
    }
  })
}

/**
 * 店铺选择接口
 */
export const shopSelect = () => {
  return request({
    url: '/api/celery-shop/shop/shop_select',
    method: 'get',
    params: {}
  })
}

/**
 * 添加拼多多采购链接 /add_base_url
 */
export const addBaseUrl = (productId) => {
  return request({
    url: '/api/product-source/source/add_base_url',
    method: 'get',
    params: {
      productId
    }
  })
}


/**
 * 查询同步数据 data_list_search
 */

export const dataListSearch = (ids) => {
  return request({
    url: '/api/product-source/source/data_list_search',
    method: 'post',
    data: ids
  })
}